package com.siruier.boss.wxapi

import com.siruier.boss.ui.utils.Logger
import com.tencent.mm.opensdk.constants.ConstantsAPI
import com.umeng.socialize.weixin.view.WXCallbackActivity
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram

class WXEntryActivity : WXCallbackActivity() {

    companion object {

        @JvmStatic
        var wxMiniProgramPayCallback: WXPayCallback? = null
    }

    override fun onResp(resp: BaseResp) {
        super.onResp(resp)
        Logger.e("resp==>" + resp.errStr)
        Logger.e("resp==>" + resp.transaction)
        Logger.e("resp==>" + resp.errCode)
        kotlin.runCatching {
            wxMiniProgramPayCallback?.invoke(resp)
        }
        wxMiniProgramPayCallback = null
    }
}